﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Microsoft.Popfly.GameCreator.Collections
{
    public class OrderedBehaviorStringtionary : OrderedDictionary<string, Data.BehaviorInfo>
    {
        private int m_nullCount = 0;
        public new void Add(string key, Data.BehaviorInfo value)
        {
            if (key == "null")
            {
                if (m_nullCount != 0)
                {
                    key = key + " " + m_nullCount;
                    value.Name = key;
                }
                m_nullCount++;
            }
            base.Add(key, value);
        }
    }
}
